/*
 * Created on 2006-6-26
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package com.powerunion.datacollection.report.excelreport.datasource;

import java.util.List;
import java.util.Map;

import com.powerunion.datacollection.report.excelreport.config.DataSourceConfig;
/**
 * 静态数据源对象, 静态数据源中的数据需要用户手动添加,
 * 无法从其他如数据库,或输入等输入源中自动检索数据.
 * <br><br>
 * 静态数据源使用示例： <br>
 * ...<br>
 * StaticDataSource ds = (StaticDataSource)dataSources.get("groupDs");<br>
 * //向静态数据源中手动添加数据。<br>
 * ds.addField("field1", "string value");<br>
 * ds.addField("field2", ObjectValue);<br>
 * ...<br>
 * //插入一条记录<br>
 * ds.addRecord();<br>
 * ...<br>
 * 注意：如果多条记录则上述过程可以循环调用。<br>
 * 
 * @author juny
 */
public class StaticDataSource extends BaseDataSource{
    public StaticDataSource(){
        super();
    }
    
    public StaticDataSource(DataSourceConfig config, String name){
        super(config, name);
    }
    
    /*
     * (non-Javadoc)
     * @see excel.report.datasource.BaseDataSource#query(java.util.Map)
     */
    public int query(Map param) throws Exception {
        return QUERY_SUCCESS;
    }
    
    /*
     *  (non-Javadoc)
     * @see excel.report.datasource.IDataSource#getType()
     */
    public String getType(){
        return DataSourceConfig.DS_TYPE_STATIC;
    }
    
}
